import jwt


def create_jwt_token(secret_key, payload):
    token = jwt.encode(payload, secret_key, algorithm="HS256")
    return token


def decode_jwt_token(token, secret_key):
    try:
        payload = jwt.decode(token, secret_key, algorithms=["HS256"])
        return payload
    except jwt.ExpiredSignatureError:
        return "Token expired"
    except jwt.InvalidTokenError:
        return "Invalid token"
